package net.simflow.swf.analyzer.gui.ginfo.generator;

import java.util.ArrayList;
import java.util.LinkedHashMap;

import net.simflow.swf.analyzer.data.TupleStrInt;
import net.simflow.swf.analyzer.graph.stats.data.GraphStats;
import net.simflow.swf.analyzer.stringtrans.GraphStatsStringGenerator;

public class DegreeGenerator extends AbstractGenerator {
	protected final static LinkedHashMap<String, Boolean> DEFAULT_CONFIG = new LinkedHashMap<String, Boolean>();
	static {
		DEFAULT_CONFIG.put(GraphStats.GRAPH_NAME, true);
		DEFAULT_CONFIG.put(GraphStats.DEGREE_DISTRIBUTION, true);
	}

	private static DegreeGenerator instance = new DegreeGenerator();

	private DegreeGenerator() {
	}

	public static DegreeGenerator getInstance() {
		return instance;
	}

	@Override
	protected String getTitle(Object stats) {
		return "Graph";
	}

	@Override
	protected ArrayList<TupleStrInt> getInfo(String style, Object stats) {
		return GraphStatsStringGenerator.getInstance().generate(style,
				(GraphStats) stats);
	}

	@Override
	public LinkedHashMap<String, Boolean> getDefaultConfig() {
		return DEFAULT_CONFIG;
	}
}
